<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/view/common/taglibs.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>${appname}-<c:if test="${!empty sessionScope._local_node_session}">${sessionScope._local_node_session.nodeName}-</c:if>${si:ctname("NET_TYPE",sessionScope._netType)}</title>
<%@ include file="/WEB-INF/view/common/css_js_ace.jsp"%>
<style type="text/css">
.xmlContent{
	min-height:200px;
}

.profile-info-name{
	width:180px;
}
.profile-info-value{
	margin-left:180px;
}
</style>
<script type="text/javascript">
$(function(){
	//$('#inputForm input').tooltip({'placement':'top'});
	$('#inputForm input').tooltip();
	
	//表单验证
	$('#inputForm').checkForm();
	
	$('#inputForm').ajaxForm({ 
		url: _ctx + "/registry/tlq_qcu_do_update.do", 
		type: "post",
		dataType:"json",
		beforeSubmit: function(){
			$("#sbmBtn").attr("disabled","disabled");
		},
		clearForm: false,
		resetForm: false,
		success: function(resp){
			if(resp.status == '1' ){
				ui.msg(resp.msg, 1);
				ui.go(_ctx + '/registry/tlq_qcu.do');
			}else{
				ui.msg(resp.msg, 0);
			}
			$("#sbmBtn").removeClass("disabled").attr("disabled",null);
		},
		error:function(resp){
			ui.msg('请求发送失败', 0);
			$("#sbmBtn").removeClass("disabled").attr("disabled",null);
		}
	 });
})
</script>
</head>
<body>
<%@ include file="/WEB-INF/view/common/topbar.jsp"%>
<c:set var="vo" value="${_data}"/>
<div class="main-container" id="main-container">
	<div class="main-container-inner">
		<%@ include file="/WEB-INF/view/common/sidebar.jsp"%>
		<div class="main-content">
			<div class="breadcrumbs" id="breadcrumbs">
				<ul class="breadcrumb">
					<li>
						<i class="icon-home home-icon"></i>
						<a href="#">首页</a>
					</li>
					<li><a href="#">交换管理</a></li>
					<li><a href="#">传输通道管理</a></li>
					<li class="active">TonglinkQ资源分配</li>
				</ul>
			</div>

			<div class="page-content">
				<div class="row">
					<div class="col-xs-12">
						<div class="widget-box">
							<div class="widget-header widget-header-flat">
								<h5 class="smaller lighter">
									<i class="icon-desktop"></i> 修改QCU参数<span class='label label-warning arrowed-in-right arrowed'>当前TLQ[${ip }]</span>
								</h5>
								<div class="widget-toolbar no-border">
									<a class="btn btn-primary btn-xs" href="${ctx}/registry/tlq_qcu.do"><i class="icon-arrow-left"></i> 返回&nbsp;&nbsp;</a>
								</div>
							</div>
							<div class="widget-body">
								<div class="widget-main">
									<c:if test="${tlqQcu == null}">
									<div class="alert alert-danger">
										<strong><span class="icon-warning-sign"></span> TonglinkQ 对应的队列控制单元尚未成功创建！请联系管理员创建相应的队列控制单元。</strong>
									</div> 
									</c:if>
									<c:if test="${tlqQcu != null}">
									<div class="alert alert-info text-center">
										<strong><span class="icon-warning-sign"></span> 注意！修改QCU参数后，需要重新启动QCU才能使新的参数生效，其流程如下所示：</strong>
										<ul class="wizard-steps" style="display:hidden" id="steps">
											<li data-target="#step1" class="active">
												<span class="step">1</span>
												<span class="title">修改QCU参数</span>
											</li>

											<li data-target="#step2">
												<span class="step">2</span>
												<span class="title">停止QCU</span>
											</li>

											<li data-target="#step3">
												<span class="step">3</span>
												<span class="title">启动QCU</span>
											</li>

											<li data-target="#step4">
												<span class="step">4</span>
												<span class="title">完成(新修改的参数生效)</span>
											</li>
										</ul>
									</div>
									<form class="form-horizontal" role="form" id="inputForm" action=""  method="post" >
									<input type="hidden" name="ip" value="${ip }" />
										<div class="form-group">
											<div class="col-sm-4 control-label no-padding-right">创建本地队列的最大消息数 *</div>
											<div class="col-sm-8">
											<input type="text" class="col-xs-10 col-sm-5" 
											value="${tlqQcu.dyLocalQueMsgNum}"  name="dyLocalQueMsgNum" id="dyLocalQueMsgNum"  
											datatype="require|integer" 
											msg="必填项，创建本地队列的最大消息数|只能填写数字" title="创建本地队列的最大消息数"/>
											</div>
										</div>
										<div class="space-4"></div>
										<div class="form-group">
											<div class="col-sm-4 control-label no-padding-right">创建发送队列的最大消息数 *</div>
											<div class="col-sm-8">
											<input type="text" class="col-xs-10 col-sm-5" 
											value="${tlqQcu.dySendQueMsgNum}"  name="dySendQueMsgNum" id="dySendQueMsgNum"  
											datatype="require|integer" 
											msg="必填项，创建发送队列的最大消息数|只能填写数字" title="创建发送队列的最大消息数"/>
											</div>
										</div>
										<div class="space-4"></div>
										<div class="form-group">
											<div class="col-sm-4 control-label no-padding-right">本地队列中消息动态可用空间（单位KB） *</div>
											<div class="col-sm-8">
											<input type="text" class="col-xs-10 col-sm-5" 
											value="${tlqQcu.dyLocalQueSpaceSize}"  name="dyLocalQueSpaceSize" id="dyLocalQueSpaceSize"  
											datatype="require|integer" 
											msg="必填项，本地队列中消息动态可用空间|只能填写数字" title="本地队列中消息动态可用空间"/>
											</div>
										</div>
										<div class="space-4"></div>
										<div class="form-group">
											<div class="col-sm-4 control-label no-padding-right">本地队列数据存储区预留空间（单位KB） *</div>
											<div class="col-sm-8">
											<input type="text" class="col-xs-10 col-sm-5" 
											value="${tlqQcu.dyLocalQueDataBuff}"  name="dyLocalQueDataBuff" id="dyLocalQueDataBuff"  
											datatype="require|integer" 
											msg="必填项，本地队列数据存储区预留空间|只能填写数字" title="本地队列数据存储区预留空间"/>
											</div>
										</div>
										<div class="space-4"></div>
										<div class="form-group">
											<div class="col-sm-4 control-label no-padding-right">发送队列中消息动态可用空间（单位KB） *</div>
											<div class="col-sm-8">
											<input type="text" class="col-xs-10 col-sm-5" 
											value="${tlqQcu.dySendQueSpaceSize}"  name="dySendQueSpaceSize" id="dySendQueSpaceSize"  
											datatype="require|integer" 
											msg="必填项，发送队列中消息动态可用空间|只能填写数字" title="发送队列中消息动态可用空间"/>
											</div>
										</div>
										<div class="space-4"></div>
										<div class="form-group">
											<div class="col-sm-4 control-label no-padding-right">发送队列数据存储区预留空间（单位KB） *</div>
											<div class="col-sm-8">
											<input type="text" class="col-xs-10 col-sm-5" 
											value="${tlqQcu.dySendQueDataBuff}"  name="dySendQueDataBuff" id="dySendQueSpaceSize"  
											datatype="require|integer" 
											msg="必填项，发送队列数据存储区预留空间|只能填写数字" title="发送队列数据存储区预留空间"/>
											</div>
										</div>
										<hr>
										<div class="clearfix form-group">
											<div class="col-md-offset-3 col-md-9">
											<button type="submit" class="btn btn-sm btn-info" id="sbmBtn"><i class="icon-ok bigger-110"></i>提交</button>
											</div>
										</div>
									</form>
									</c:if>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
</body>
</html>
